New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/partially matched uniform cx #11
Feature/partially matched uniform cx #11
Conversation
4015496
to
79714f3
Compare
79714f3
to
6e092e0
Compare
This method seems interesting :). But why do you add the |
@Martin1887 It was needed because on |
@Martin1887 I think this is ready for review/feedback. |
I have reviewed it a bit more. Could not be used a If the response is negative it could be merged too as it, but it is convenient to reduce the dependencies. I will probably revisit it when I have more free time to try to optimize it anyway (probably I will not be able to, your implementation seems good :-)). |
803ad4b
to
c716381
Compare
@Martin1887 I like your suggestion and hadn't thought of it, just changed it to match. |
c716381
to
ca3dae4
Compare
OK, merged. If i do changes in the future in this crossover I will tell you. |
Hello. I have revised your implementation and I think that the In addition, I don't like the use of Kind Regards. |
An implementation of "uniform partially matched crossover". An example is given in this paper in section 4.4.4. Useful for problems such as traveling salesman and genotypes that require uniquely-labeled genes
0
throughN
to remain present in the chromosome following crossover. An example of the problem having such a crossover alleviates:Parent 1:
[1,2,3,4,5]
Parent 2:
[5,4,3,2,1]
Single point crossover after the 2nd index
Child 1:
[5,4,3,4,5]
Child 2:
[1,2,3,2,1]
If you imagine the genes as stops along a route, the resulting genotypes are no longer valid because 2 locations are skipped in each child representation. This is the problem that partially-matched crossover is meant to alleviate; it's an element-preserving operation.